package com.yangluyao.easyexcel.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sun.corba.se.spi.ior.iiop.IIOPProfileTemplate;
import com.yangluyao.easyexcel.mapper.QualityUserMapper;
import com.yangluyao.easyexcel.model.QualityUser;
import com.yangluyao.easyexcel.service.IQualityUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Insert;
import org.apache.poi.hssf.record.chart.FontBasisRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单分配表 服务实现类
 * </p>
 *
 * @author hejiayao
 * @since 2020-04-22
 */
@Service
@Slf4j
public class QualityUserServiceImpl extends ServiceImpl<QualityUserMapper, QualityUser> implements IQualityUserService {

    @Autowired
    private  QualityUserMapper qualityUserMapper;

    @Override
    public int inserBatch(List<QualityUser> qualityUserList) {
        int insert=0;
        if(qualityUserList!=null && !qualityUserList.isEmpty()){
            for (QualityUser qualityUser : qualityUserList) {
                insert = qualityUserMapper.insert(qualityUser);
                insert++;
            }
        }
        return insert;
    }
}
